﻿using Microsoft.EntityFrameworkCore;
using System;

namespace App.DbContexts
{
    /// <summary>
    /// 数据库上下文
    /// 最新日期：2021-11-24
    /// 此模型不要做任何修改
    /// 任何的修改将会被覆盖
    /// </summary>
    public class AppTestDBContext : DbContext
    {
        public AppTestDBContext()
        {
        }
        public AppTestDBContext(DbContextOptions<AppTestDBContext> options) : base(options)
        {
        }
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            //注入Sql链接字符串
            optionsBuilder.UseSqlServer(Config.AppTestDBConnectionString);
        }

        #region 表实体
        public DbSet<TestEntity> Test { get; set; }
        public DbSet<TestDetailEntity> TestDetail { get; set; }

        public DbSet<ShareEntity> Share { get; set; }
        public DbSet<ShareOnTimeEntity> ShareOnTime { get; set; }
        public DbSet<ShareJobEntity> ShareJob { get; set; }
        public DbSet<MyShareEntity> MyShare { get; set; }
        #endregion
    }
}